<?php

class UnserializeExploits
{
    public function FileGetContents($x)
    {
        $string = file_get_contents($x);
        unserialize(<error descr="[EA] Perhaps it's possible to exploit the unserialize via: file_get_contents(...).">$string</error>);
    }

    public function DecodingWebFormats($x)
    {
        $string = base64_decode($x);
        $string = urldecode($x);
        unserialize(<error descr="[EA] Perhaps it's possible to exploit the unserialize via: base64_decode(...), urldecode(...).">$string</error>);
    }

    public function RequestVariables()
    {
        $string1 = $_COOKIE['index'];
        $string1 = $_FILES['index'];
        unserialize(<error descr="[EA] Perhaps it's possible to exploit the unserialize via: $_COOKIE, $_FILES.">$string1</error>);

        $string2 = $_REQUEST['index'];
        $string2 = $_POST['index'];
        $string2 = $_GET['index'];
        unserialize(<error descr="[EA] Perhaps it's possible to exploit the unserialize via: $_GET, $_POST, $_REQUEST.">$string2</error>);
    }

    public function InternalVariables()
    {
        $string = $_SESSION['index'];
        $string = $_ENV['index'];
        $string = $_SERVER['index'];
        unserialize($string);
    }
}